package com.beiji.usercentert.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.beiji.usercentert.model.domain.User;

import javax.servlet.http.HttpServletRequest;

/**
* @author wangzhi
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2024-06-23 17:17:47
*/
public interface UserService extends IService<User> {

    /**
     * 用户校验
     * @param userAccount 账号
     * @param userPassword 用户密码
     * @param checkPassword 校验码
     * @return
     */
    long userRegister(String userAccount, String userPassword, String checkPassword, String planetCode);


    /**
     * 用户登录
     *
     * @param userAccount  用户账号
     * @param userPassword 用户密码
     * @param request
     * @return 用户(脱敏)
     */
    User doLogin(String userAccount, String userPassword, HttpServletRequest request);

    User getSafetyUser(User originUser);

    /**
     * 用户注销
     * @param request
     * @return
     */
    Integer userLogout(HttpServletRequest request);
}
